[PATCH -next] dm: fix dm-flakey printk warning

From: Randy Dunlap <rdunlap [at] xenotime.net>

Fix printk format warning for sector_t, which can be (unsigned)
long or long long.

drivers/md/dm-flakey.c:257: warning: format '%lu' expects type 'long unsigned int', but argument 7 has type 'sector_t'

Signed-off-by: Randy Dunlap <rdunlap [at] xenotime.net>
---
drivers/md/dm-flakey.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--- linux-next-20110721.orig/drivers/md/dm-flakey.c
+++ linux-next-20110721/drivers/md/dm-flakey.c
[at] [at] -255,10 +255,11 [at] [at] static void corrupt_bio_data(struct bio
data[fc->corrupt_bio_byte - 1] = fc->corrupt_bio_value;

DMDEBUG("Corrupting data bio=%p by writing %u to byte %u "
- "(rw=%c bi_rw=%lu bi_sector=%lu cur_bytes=%u)\n",
+ "(rw=%c bi_rw=%lu bi_sector=%llu cur_bytes=%u)\n",
bio, fc->corrupt_bio_value, fc->corrupt_bio_byte,
(bio_data_dir(bio) == WRITE) ? 'w' : 'r',
- bio->bi_rw, bio->bi_sector, bio_bytes);
+ bio->bi_rw, (unsigned long long)bio->bi_sector,
+ bio_bytes);
}
}
rdunlap [ Fr, 22 Juli 2011 01:10 ] [ ID #2062450 ]

Re: [dm-devel] [PATCH -next] dm: fix dm-flakey printk warning

On Thu, Jul 21, 2011 at 04:10:47PM -0700, Randy Dunlap wrote:
> Fix printk format warning for sector_t, which can be (unsigned)
> long or long long.

Folded, thanks.

Alasdair

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Alasdair G Kergon [ Fr, 22 Juli 2011 18:25 ] [ ID #2062485 ]
Linux » gmane.linux.raid » [PATCH -next] dm: fix dm-flakey printk warning

Vorheriges Thema: how to recover filesystem after clobbering array?
Nächstes Thema: mdadm striped parity RAID with Advanced Format drives